<?php $this->load->view('layout/header');?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <h3 class="page-title">新闻管理 <small>公告信息</small></h3>
            <?php echo breadcrumb(array('新闻管理', 'mailbox/grid'=>'发布公告信息')); ?>
        </div>
    </div>
    <?php echo execute_alert_message() ?>
    <div class="row-fluid">
        <div class="span12">
            <div class="portlet box green">
                <div class="portlet-title">
                    <div class="caption"><i class="icon-plus-sign"></i>发布公告信息</div>
                    <div class="tools">
                        <a class="collapse" href="javascript:;"></a>
                        <a class="remove" href="javascript:;"></a>
                    </div>
                </div>
                <div class="portlet-body form">
                    <form class="form-horizontal pubilic-validate-form" action="<?php echo base_url('mailbox/addPost') ?>" method="post" enctype="multipart/form-data">
                        <div class="control-group">
                            <label class="control-label"><em>* </em>接收者</label>
                            <div class="controls">
                            <?php foreach($user_type as $item): ?>
                                <label class="checkbox">
                                    <input type="checkbox" name="user_type[]" value="<?php echo $item->type_id ?>" class="checkboxes" />
                                    <span><?php echo $item->type_name; ?></span>
                                </label>
                            <?php endforeach;?>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label"><em>* </em>主题名称</label>
                            <div class="controls">
                                <input type="hidden" name="type" value="2"/> <!-- 后台发布则是 系统消息 -->
                                <input type="hidden" name="fid" value="16"/> <!-- 发布者编号 -->
                                <input type="hidden" name="fname" value="着想科技"/> <!-- 发布者名称 -->
                                <input type="hidden" name="sname" value="会员"/> <!-- 接收者名称 -->
                                <input type="text" name="title" class="m-wrap span6 required"/>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label"><em>* </em>内容</label>
                            <div class="controls">
                                <textarea name="content" class="textarea-multipart-edit required"></textarea>
                            </div>
                        </div>
                        <div class="form-actions">
                            <button class="btn green" type="submit"><i class="icon-ok"></i> 保存</button>
                            <a href="<?php echo base_url('mailbox/grid') ?>">
                                <button class="btn" type="button">返回</button>
                            </a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $this->load->view('layout/footer');?>
<?php $this->load->view('user/addSupplierUid/ajaxGetUser');?>
<script type="text/javascript">
$(document).ready(function(){
    $('.pubilic-validate-form').validate({
        ignore: '',
    });
});
</script>